package ai.mspbots.gateway.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

import java.util.HashMap;
import java.util.Map;

@Configuration
@ConfigurationProperties(prefix = "elastic.apm")
@Data
public class ElasticApmConfiguration {

    public String serviceName;
    public String environment;
    public String applicationPackages;
    public String serverUrls;
    public Map<String, String> getConfig() {
        Map<String, String> config = new HashMap<>();
        config.put("service_name", this.serviceName);
        config.put("environment", this.environment);
        config.put("application_packages", this.applicationPackages);
        config.put("server_urls", this.serverUrls);
        return config;
    }
}
